using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Star : MonoBehaviour
{

    public float Time = 10f;
    // Start is called before the first frame update
    void Start()
    {

        Invoke("startime", Time);

    }

    // Update is called once per frame
    void Update()
    {
        
    }

    void startime() 
    {
        if (GameManager.gameManager_Instance.StarCount == 1)
        {
            GameManager.gameManager_Instance.StarCount -= 1;
        }
        Destroy(this.gameObject);
    }
}
